const BusinessError =require('./BusinessError')
class UserError extends BusinessError {
  constructor(message) {
    super(message||'用户相关错误');
    this.name = this.constructor.name;
    this.errorCode='200000';
  }
}
class UserNotExistError extends UserError {
  constructor(message) {
    super(message||'用户不存在');
    this.name = this.constructor.name;
    this.errorCode='200001';
  }

}
class UserPasswordError extends UserError {
  constructor(message) {
    super(message||'用户密码错误');
    this.name = this.constructor.name;
    this.errorCode='200002';
  }
}
class UserAuthError extends UserError {
  constructor(message) {
    super(message||'用户鉴权失败');
    this.name = this.constructor.name;
    this.errorCode='200003';
  }
}
class UserLoginExpiredError extends UserError {
    constructor(message) {
        super(message||'用户登录过期');
        this.name = this.constructor.name;
        this.errorCode='200004';
    }
}

module.exports={
  UserError,
  UserNotExistError,
  UserPasswordError,
  UserAuthError,
  UserLoginExpiredError
}
